package com.yzh.homework;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;

/**
 * @author 于振晗
 * @title: HomeWork02
 * @description: TODO 北京尚学堂bjsxt转为字节数组
 * @date 2020年09月07日
 * @path com.yzh.homework
 */
public class HomeWork02 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String str="北京尚学堂bjsxt";
        byte[] bytes = str.getBytes("utf-8");
        System.out.println(Arrays.toString(bytes));
        String s = new String(bytes, "utf-8");
        System.out.println(s);


    }
}
